<?php

class nivel extends object_standard {

    //attributes
    
    
    
    protected $id;
    protected $nombre;
    protected $dificultad;
    protected $mision;
	protected $diseñador;
	protected $videojuego;
    //components
    var $components = array();
    //auxiliars for primary key and for files
    var $auxiliars = array();

    //data about the attributes
    public function metadata() {
        return array("id" => array(), "nombre" => array(), "dificultad" => array(), "mision" => array(),
            "diseñador" => array("foreign_name" => "e_n", "foreign" => "diseñador", "foreign_attribute" => "cedula"),
            "videojuego" => array("foreign_name" => "v_n", "foreign" => "videojuego", "foreign_attribute" => "id"));
    }

    public function primary_key() {
        return array("id");
    }

    public function relational_keys($class, $rel_name) {
        switch ($class) {
            case "diseñador":
                switch ($rel_name) {
                    case "e_n":
                        return array("diseñador");
                        break;
                }
                case "videojuego":
                switch ($rel_name) {
                    case "v_n":
                        return array("videojuego");
                        break;
                }
                break;
            default:
                break;
        }
    }

}

?>